package com.atguigu.serviceedu.controller;

import com.atguigu.commonutils.R;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.*;

/**
 * create Time2020/4/16 taolee
 */
@Api(value = "")
@RestController
@RequestMapping("/eduservice/user")
@CrossOrigin
public class EduLoginController {


    //login
    @PostMapping("login")
    public R login() {
        return R.ok().data("token", "admin");
    }

    //info
    @GetMapping("info")
    public R info() {
        return R.ok().data("roles", "[admin]").data("name", "admin").data("avatar", "https://guli-file-190513.oss-cn-beijing.aliyuncs.com/avatar/default.jpg");

    }

}
